<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>mymsgro</title>
	<link rel="stylesheet" type="text/css" href="css/main.css" />
	<link rel="stylesheet" type="text/css" href="css/meniu.css" />
	<link rel="stylesheet" type="text/css" href="css/style.css" />

</h:head>
<h:body>

	<ui:include src="header.xhtml" />

	<h:panelGroup layout="block" id="content">

		<ui:include src="leftMenu.xhtml" />

		<h:panelGroup layout="block" id="contenRight">
			<f:event type="preRenderView"
				listener="#{bookTableData.preRenderView}" />
			<h:panelGroup layout="block" id="header" style="margin-top: 20px;">
				<ul>
					<li id="selected"><a>My Books</a></li>
				</ul>
			</h:panelGroup>

			<h:panelGroup layout="block" id="contentTab">
				<h:form>
					<h:commandButton style="width:50px; height:30px;"
						image="resources/img/back-button.png" action="bookCRUD.xhtml"
						immediate="true"></h:commandButton>
					<p:dataTable id="dt" value="#{bookTableData.historyBorroweds}"
						var="borrowed" paginator="true" rows="5"
						paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
						rowsPerPageTemplate="5,10,15">
						<p:column>
							<f:facet name="header">
								<h:outputText value="Borrow Date" />
							</f:facet>
							<h:outputText id="borrowDate" value="#{borrowed.borrowDate}">
								<f:convertDateTime type="date" readonly="true"
									pattern="yyyy-MM-dd" />
							</h:outputText>
						</p:column>
						<p:column>
							<f:facet name="header">
								<h:outputText value="Must Return Date" />
							</f:facet>
							<h:outputText id="mustReturnDate"
								value="#{borrowed.mustReturnDate}">
								<f:convertDateTime type="date" pattern="yyyy-MM-dd" />
							</h:outputText>
						</p:column>
						<p:column>
							<f:facet name="header">
								<h:outputText value="Return Date" />
							</f:facet>
							<h:outputText id="returnDate" readonly="true"
								value="#{borrowed.returnDate}">
								<f:convertDateTime type="date" pattern="yyyy-MM-dd" />
							</h:outputText>
						</p:column>

						<p:column>
							<f:facet name="header">
								<h:outputText value="Borrowed By" />
							</f:facet>
							<h:inputText id="userOd" readonly="true" styleClass="inputSize"
								value="#{borrowed.borrowedBy.firstname} #{borrowed.borrowedBy.lastname}">

							</h:inputText>
						</p:column>
					</p:dataTable>


				</h:form>

			</h:panelGroup>
		</h:panelGroup>
	</h:panelGroup>
</h:body>
</html>